//
//  PicCell.m
//  UI15_太平洋电脑网
//
//  Created by dllo on 16/3/30.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PicCell.h"

@implementation PicCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self= [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self  createView];
    }
    return self;
}

- (void)createView{
    self.titleLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.titleLabel];
    [_titleLabel release];
    
    self.firstImageView = [[UIImageView alloc]init];
    [self.contentView addSubview: self.firstImageView];
    [_firstImageView release];
    
    self.secondImageView = [[UIImageView alloc]init];
    [self.contentView addSubview: self.secondImageView];
    [_secondImageView release];
    
    self.thirdImageView = [[UIImageView alloc]init];
    [self.contentView addSubview: self.thirdImageView];
    [_thirdImageView release];
    
    self.tuJiLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.tuJiLabel];
    [_tuJiLabel release];
    self.tuJiLabel.text = @"图集";
    self.tuJiLabel.textColor = [UIColor greenColor];
    self.tuJiLabel.layer.borderColor = [[UIColor greenColor] CGColor];
    self.tuJiLabel.layer.borderWidth = 1;
    self.tuJiLabel.layer.cornerRadius = 3;
    self.tuJiLabel.textAlignment = 1;
    
    self.pubDateLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.pubDateLabel];
    [_pubDateLabel release];
    self.pubDateLabel.font = [UIFont systemFontOfSize:13];
    
    self.imgCountLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.imgCountLabel];
    [_imgCountLabel release];
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 10, 394, 30);
    self.firstImageView.frame = CGRectMake(10, 50, 118, 100);
    self.secondImageView.frame = CGRectMake(148, 50, 118, 100);
    self.thirdImageView.frame = CGRectMake(414 - 128 , 50, 118, 100);
    self.tuJiLabel.frame = CGRectMake(10, 160, 50, 20);
    self.pubDateLabel.frame = CGRectMake(254, 160, 60, 20);
    self.imgCountLabel.frame = CGRectMake(354, 160, 50, 20);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
